home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / netclb23 / examples.exe / SHELLINF.C < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-20  |  1.5 KB  |  45 lines

  1. /***************************************************************************/
  2. /* File:             SHELLINF.C                                            */
  3. /*                                                                         */
  4. /* Function:         Output information about the workstation shell.       */
  5. /*                                                                         */
  6. /* Usage:            shellinf                                              */
  7. /*                                                                         */
  8. /* Functions Called: GetNetwareShellVersion                                */
  9. /*                   ISShellLoaded                                         */
  10. /*                                                                         */
  11. /***************************************************************************/
  12. #include <stdio.h>
  13. #include <string.h>
  14.  
  15. #include "netware.h"
  16.  
  17. static char *types[] = { "      OS type","   OS version",
  18.                          "   HWARE type","Short HW type"};
  19.  
  20. void main(void)
  21. {
  22. char info[40];
  23. byte major_v,minor_v,level;
  24. char *p;
  25. int i;
  26.  
  27.    if (IsShellLoaded() != SUCCESS)
  28.    {
  29.       printf("*** No netware shell loaded ***\n");
  30.       return;
  31.    }
  32.  
  33.    GetNetwareShellVersion(info,&major_v,&minor_v,&level);
  34.    
  35.    printf("\n        Shell: %02.2d.%02.2d%c\n\n",major_v,minor_v,level+'A');
  36.    p=info;
  37.    for(i=0;i<4;i++)
  38.    {
  39.       printf("%s: %s\n",types[i],p);
  40.       p+=strlen(p);
  41.       p++;
  42.    }
  43. }
  44.  
  45.